﻿using BCCommon.TMS.Transport;
using BCEntity.TMS.VehicleTransportBusinessConfig;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCData.TMS.VehicleTransportBusinessConfig
{
    /// <summary>
    /// 车辆运输业务配置
    /// </summary>
    public interface IVehicleTransportBusinessConfigData
    {
        /// <summary>
        /// 根据运输业务获取车辆运输业务配置
        /// </summary>
        /// <param name="transportBusiness">运输业务</param>
        /// <returns></returns>
        Task<VehicleTransportBusinessConfigEntity> GetByTransportBusiness(TransportBusinessType transportBusiness);

        /// <summary>
        /// 添加车辆运输业务配置
        /// </summary>
        /// <param name="entity">车辆运输业务配置信息</param>
        /// <returns></returns>
        Task<VehicleTransportBusinessConfigEntity> Insert(VehicleTransportBusinessConfigEntity entity);

        /// <summary>
        /// 获取车辆运输业务配置
        /// </summary>
        /// <param name="transportBusiness">运输业务</param>
        /// <param name="pageIndex">页号</param>
        /// <param name="pageSize">每页数据条数</param>
        /// <returns></returns>
        Task<(IEnumerable<VehicleTransportBusinessConfigViewEntity>, int)> Query(TransportBusinessType? transportBusiness, int pageIndex, int pageSize);

        /// <summary>
        /// 获取车辆运输业务配置
        /// </summary>
        /// <param name="vehicleTransportBusinessConfigId">车辆运输业务配置Id</param>
        /// <returns></returns>
        Task<VehicleTransportBusinessConfigEntity> GetEntity(int vehicleTransportBusinessConfigId);
        /// <summary>
        /// 获取车辆运输业务配置
        /// </summary>
        /// <returns></returns>
        Task<IEnumerable<VehicleTransportBusinessConfigViewEntity>> GetList();

        /// <summary>
        /// 更新车辆运输业务配置
        /// </summary>
        /// <param name="entity">车辆运输业务配置信息</param>
        /// <returns></returns>
        Task<VehicleTransportBusinessConfigEntity> Update(VehicleTransportBusinessConfigEntity entity);

        /// <summary>
        /// 删除车辆运输业务配置
        /// </summary>
        /// <param name="vehicleTransportBusinessConfigId"></param>
        Task<int> Delete(int vehicleTransportBusinessConfigId);
        /// <summary>
        /// 获取所有车辆运输业务配置
        /// </summary>
        /// <param name="enabled">是否可用</param>
        /// <returns></returns>
        Task<IEnumerable<VehicleTransportBusinessConfigEntity>> GetAllList(bool? enabled);
    }
}
